package org.jiuling.gaode.spring.config;

import org.jiuling.gaode.config.GaoDeConfig;
import org.jiuling.gaode.geocode.GaoDeGeocode;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 高德SpringBean配置
 * @author 紫灵
 * @date 2024年08月22日 17时14分47秒
 */
@Configuration
public class GaoDeSpringBeanConfig {

    @Bean
    @ConfigurationProperties(prefix = "jiu-ling.gaode.config")
    public GaoDeConfig gaoDeConfig() {
        return new GaoDeConfig();
    }

    @Bean
    public GaoDeGeocode geographicCode() {
        return new GaoDeGeocode(gaoDeConfig());
    }

}
